<template>
  <div id="per-recommend">
      <Banner :banners="banners"/>
      <SongListRec :songList="songList"/>
  </div>
</template>

<script>
  import Banner from "./childs/Banner";
  import SongListRec from "./childs/SongListRec";

  import {home} from "@/network/home";

  export default {
    name: "PerRecommend",
    components:{
      Banner,
      SongListRec,
    },
    data(){
      return {
        banners:[],     //轮播图数据
        songList:[],    //歌单数据
      }
    },
    created() {
      /**
       *获取网络请求
       */
      // 请求轮播图数据
      home.getBanner().then(res => {
        this.banners = res.data.banners
        // console.log(res);
      })
      home.getSonglist().then(res => {
        this.songList = res.data.result
        // console.log(res);
      })
      home.getTest().then(res => {
        console.log('测试',res);
      })

    },
  }
</script>

<style scoped>

</style>
